import os

def list_all(dir_path="."):
  """
  Lists all files and directories in a directory and its subdirectories recursively.

  Args:
    dir_path: The path to the directory to start listing from (defaults to ".")

  Returns:
    A list of tuples containing the directory path, subdirectory names, and filenames.
  """
  all_items = []
  for root, dirs, files in os.walk(dir_path):
    all_items.append((root, dirs, files))
  return all_items

# Example usage
all_directory_info = list_all()

for root, dirs, files in all_directory_info:
  print(f"Directory: {root}")
  for dir in dirs:
    print(f"\tSubdirectory: {dir}")
  for file in files:
    print(f"\tFile: {file}")

from pathlib import Path

def list_all_files(dir_path="."):
  """
  Lists all files recursively in a directory and its subdirectories.

  Args:
    dir_path: The path to the directory to start listing from (defaults to ".")

  Returns:
    A list of file paths.
  """
  all_files = []
  for file in Path(dir_path).rglob("*"):
    if file.is_file():
      all_files.append(str(file))
  return all_files

# Example usage
all_files = list_all_files()
print("All files:")
for file in all_files:
  print(file)